home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / mkdpnd11.lha / MkDepend-1.1 / Makefile < prev    next >
Makefile  |  1995-10-14  |  2KB  |  74 lines

  1. # $VER: Makefile 1.1 (12-Oct-95)
  2. #--------------------------------------------------------------------------
  3. # Makefile for MkDepend
  4. #
  5. # Written for use with DICE 3 and Dennis Vadura's DMake 3.8p4.
  6. # It assumes a proper startup.mk .
  7. #--------------------------------------------------------------------------
  8. # Available targets:
  9. #  MkDepend: creates the program.
  10. #  clean   : deletes all objects, test.#? and a.out.
  11. #  clobber : same as clean, also deletes the executable.
  12. #  depend  : updates the Makefile by the source dependencies.
  13. #  archive : creates an archive MkDepend-<version>.lha
  14.  
  15. # Release version, should match the version number in main.c and DMakefile.
  16. VERSION= 1.1
  17.  
  18. #--------------------------------------------------------------------------
  19. # Source files
  20. SOURCES= main.c reader.c nodes.c
  21.  
  22. # Other files to archive
  23. OTHER= {$(SOURCES:b)}.h Makefile DMakefile \
  24.        HISTORY MkDepend.doc MkDepend.readme
  25.  
  26. # Object files to generate
  27. OBJECTS= obj/{$(SOURCES:b)}.o
  28.  
  29. # Check prototypes on compilation
  30. CFLAGS+= -proto
  31.  
  32. # Default rule to compile objects into a subdirectory obj/
  33. %$O : $$(@:b).c ; $(CC) $(CFLAGS) -c $< -o $@
  34.  
  35. #--------------------------------------------------------------------------
  36.  
  37. MkDepend : obj
  38.  
  39. MkDepend : $(OBJECTS)
  40.     $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
  41.  
  42. clean :
  43.     -delete #?.o test.#? a.out
  44.     -delete obj/#?.o
  45.  
  46. clobber : clean
  47.     -delete MkDepend MkDepend-#?.readme MkDepend-#?.lha
  48.     -delete obj all
  49.  
  50. depend : $(SOURCES)
  51.     MkDepend $(SOURCES) -p.c:obj/%n.o -fMakefile
  52.  
  53.  
  54. archive : depend MkDepend
  55.     makedir MkDepend-$(VERSION)
  56.     copy MkDepend $(SOURCES) $(OTHER) MkDepend-$(VERSION) clone
  57.     copy MkDepend.readme MkDepend-$(VERSION).readme
  58.     -delete MkDepend-$(VERSION).lha
  59.     lha -axmr a MkDepend-$(VERSION).lha MkDepend-$(VERSION)
  60.     delete MkDepend-$(VERSION) all quiet
  61.     @+echo "Archive created."
  62.  
  63. obj :
  64.     makedir obj
  65.  
  66. # --- DO NOT MODIFY THIS LINE -- AUTO-DEPENDS FOLLOW ---
  67. obj/main.o :  main.c nodes.h reader.h
  68.  
  69. obj/nodes.o :  nodes.c nodes.h
  70.  
  71. obj/reader.o :  reader.c reader.h
  72.  
  73. # --- DO NOT MODIFY THIS LINE -- AUTO-DEPENDS PRECEDE ---
  74.